{% extends "panel.html" %}
{% load i18n %}
{% load inventree_extras %}

{% block label %}login{% endblock %}


{% block heading %}
{% trans "Login Settings" %}
{% endblock %}

{% block content %}

{% if not email_configured %}
<div class='alert alert-block alert-danger'>
    {% trans "Outgoing email has not been configured. Some login and sign-up features may not work correctly!" %}
</div>
{% endif %}

<table class='table table-striped table-condensed'>
    <tbody>
        {% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_PWD_FORGOT" icon="fa-user-lock" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_MAIL_REQUIRED" icon="fa-at" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_ENFORCE_MFA" icon='fa-key' %}
        <tr>
            <th><h5>{% trans 'Signup' %}</h5></th>
            <td colspan='4'></td>
        </tr>
        {% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_REG" icon="fa-user-plus" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_SIGNUP_MAIL_TWICE" icon="fa-at" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_SIGNUP_PWD_TWICE" icon="fa-user-lock" %}
        {% include "InvenTree/settings/setting.html" with key="SIGNUP_GROUP" icon="fa-users" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_SIGNUP_MAIL_RESTRICTION" icon="fa-sitemap" %}
        <tr>
            <th><h5>{% trans 'Single Sign On' %}</h5></th>
            <td colspan='4'></td>
        </tr>
        {% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_SSO" icon="fa-user-shield" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_SSO_REG" icon="fa-user-plus" %}
        {% include "InvenTree/settings/setting.html" with key="LOGIN_SIGNUP_SSO_AUTO" icon="fa-key" %}
    </tbody>
</table>

{% endblock %}
